home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / util / wb / Beautifont.readme < prev    next >
Encoding:
Text File  |  1999-09-06  |  5.0 KB  |  116 lines

  1. Short:    Antialiased fonts, works even on AGA
  2. Author:   szulat@amiga.org.pl (Szymon Ulatowski)
  3. Uploader: szulat@amiga.org.pl (Szymon Ulatowski)
  4. Type:     util/wb
  5. Requires: graphics.library v39, 020+
  6.  
  7.  
  8. Introduction
  9. ============
  10.  
  11. Beautifont is a simple trick, that allows you to use antialiased fonts
  12. on Amiga's Workbench.
  13.  
  14. Do you know something similar in Windows world? Really? No - on
  15. Windows it only works on high color screens. This trick here is
  16. better, it works on any colorindex screenmode. It's damned slow and
  17. has serious limitations - but it really works...
  18.  
  19. How does it work
  20. ================
  21.  
  22. Beauifont patches Text() function from graphics.library. When you want
  23. to write something using a given font, it uses 2x bigger font and then
  24. scales the image down to its original size.
  25.  
  26. Usage
  27. =====
  28.  
  29. Simply run it from shell or icon. To quit use ctrl-C, break or simply
  30. run Beautifont again.
  31. You started it and wondering why it doesn't work? Read on.
  32. Beautifont needs BIG font for each font you want to be antialiased.
  33. BIG font is a font that is twice as high as the original. When the
  34. application wants to draw the text, antialiasing routine checks if the
  35. BIG font is present in memory. If not, it simply uses original method
  36. but it also gives a signal to Beautifont, that starts to load this
  37. font. So there is a chance, that next time this font will be available
  38. (textdrawing routine doesn't wait for this font. This would be
  39. annoying for you, dear user, and it could cause deadlocks). This
  40. missing font notification is very simple, and in most cases, several
  41. notifications are required in order to load all needed fonts.
  42. Beautifont disables antialiasing, if the original font is "designed"
  43. (so it is the bitmap font) and the BIG font is not (that means it is
  44. produced from the original by diskfont.library). This prevents from
  45. using slow routine that would not bring any visual improvements
  46. (scaling the font up and down gives the same image). 
  47. After you start Beautifont, you will see what fonts are loaded (unless
  48. you redirect output). If your default font is topaz 8, you would see:
  49. "Loading topaz.font/16..."
  50. This means some application wanted to use topaz.8 and beautifont needs
  51. BIG font for it. On most systems there is no designed topaz 16, so the
  52. diskfont.library will double topaz 8 and Beautifont will not use it
  53. for antialiasing.
  54.  
  55. Tricks
  56. ======
  57.  
  58. Font will be "nicely" antialiased, if there is 2 x bigger version
  59. available.
  60. Use outline (vector) fonts - they will always have 2 x bigger version.
  61. You can even use nonexisiting sizes - important is only the BIG fonts.
  62. (eg. you have only times.24 on disk, but you can use antialiased
  63. times.12)
  64.  
  65. Problems
  66. ========
  67.  
  68. It is slow. But not very slow - first version was 10x slower...
  69. Applications writing on other screens will not work properly in most
  70. cases (ie. use wrong colors).
  71. Prepare for crash when you use other patch after Beautifont and quit
  72. Beautifont before that patch.
  73. You cannot close Workbench while Beautifont is running. (but this is
  74. not really a problem...)
  75. If you want to use Beautifont togther with Birdie, start Beautifont
  76. first.
  77.  
  78. Why it is all impossible...
  79. ===========================
  80.  
  81. First of all, textdrawing routine doesn't know what are the colors of
  82. pixels, it has only pen indexes. This program assumes, that all
  83. graphics will be drawn on Workbench Screen and gets color information
  84. from here. This is of course wrong if there are other screens...
  85. Second problem is which pen should be used for smoothed pixels. On
  86. highcolor screenmodes you have all colors available. But here we have
  87. to allocate pen on a given screen (again it is Workbench Screen
  88. regerdless it is right or not). Pens are released when the program
  89. quits. The last big problem is how to access the screen. The text
  90. image is calculated pixel by pixel. Beautifont uses ReadPixelArray and
  91. WritePixelArray. Unfortunately all pixel based functions are very slow
  92. on planar (AGA) screens.
  93. BTW. WritePixelArray8 is used very often in recent applications and
  94. some people tried to make optimized version. There are at last 2
  95. patches available: PatchWPA8 and NewWPA8. Both of them work wrong...
  96. NewWPA8 produces artifacts if used by more than one task
  97. simultaneously (as you can imagine, text drawing is very popular and
  98. many tasks want to write something at the same time).
  99. PatchWPA8 has another bug - it tries to be smart and perform its work
  100. directly into screen bitmap. In most cases it succeeds. In fact I
  101. considered this program good for a long time. But this tricky
  102. calculation doesn't work when used on window titlebar (and window
  103. titlebar is the place, where you expect some text, don't you?).
  104. Conclusion: there is no working WPA8 patch available :-( 
  105.  
  106.  
  107. ============================= Archive contents =============================
  108.  
  109. Original  Packed Ratio    Date     Time    Name
  110. -------- ------- ----- --------- --------  -------------
  111.    18820   10567 43.8% 24-Jul-99 01:55:06 +Beautifont
  112.      649     238 63.3% 24-Jul-99 02:11:12 +Beautifont.info
  113.     4700    2132 54.6% 24-Jul-99 13:45:26 +Beautifont.readme
  114. -------- ------- ----- --------- --------
  115.    24169   12937 46.4% 25-Jul-99 16:56:52   3 files
  116.